Release 10.1A: OpenEdge Development:
Progress Dynamics Repository Reference


gst_context_scope table — gstcs

This table defines the scope of server context data, either by session or by user. If the context scope is for a user, then the context data in gsm_server_context persists across sessions and remains valid until deleted or until it expires. There is a flag on gsc_security_control that indicates when user context data should expire. This aids storing context for a user that can be reused in new sessions, such as shopping cart information that can persist between Web sessions. For user context scope, the session_obj is set to 0 and a valid user_obj must be specified.

If the context scope is for a session, then the context data in the gsm_server_context table is only valid for the duration of a single session. In this case, the session_obj is specified and the user_obj is 0. A name is given to the scope record to identify the scope. This is useful for context scoped to a user and can be used through APIs to retrieve specific types of scopes. Where the scope name is not required or specified, it is automatically set to the string value of the context_scope_obj to make it a unique number. The scope name is only unique for active context, that is, while transaction_complete is no. Once context is complete, the scope name is irrelevant and can be duplicated. This unique validation must be handled in code.

When dealing with transaction data, many context scope records could exist for a single session for a single transaction. When this is the case, the parent scope object ID identifies which scope records together form the complete transaction. The record with a parent of 0 is the top parent scope. For example, this happens on the Web when dealing with parent and child data, such as order and order lines as a single transaction across multiple Web pages. An order might contain many order lines, and the order lines have a common set of fields with different values in each case. The data stored in the gsm_server_context table points at a different context scope record to handle the same data fields existing in context for different records. The framework can gather context data across multiple Web pages for multiple records, and then commit the entire set of data as a single transaction.

The transaction_complete flag is only set for the top parent context scope where the object ID is 0. It indicates that the transaction is finished and can be tidied up by the framework. The session_complete flag on gst_session can override this behavior when that flag is set to YES and the context data is session scoped. Additionally, the scope name must be unique for context scope where the transaction_complete flag is NO.

Table 13–23 lists the table’s FLA, fields, and foreign keys.

Table 13–23: gst_context_scope table information 
Table FLA
Fields (data type)
Foreign keys
gstcs
context_scope_obj (Decimal)
scope_name (Character)
session_obj (Decimal)
user_obj (Decimal)
transaction_complete (Logical)
scope_creation_date (Date)
scope_creation_time (Integer)
last_access_date (Date)
last_access_time (Integer)
parent_context_scope_obj (Decimal)
context_scope_obj
session_obj
user_obj

Table 13–24 gives details of the table’s indexes.

Table 13–24: gst_context_scope index information 
Index name
Elements
Type
XPKgst_context_scope
context_scope_obj
Primary Unique
XIE2gst_context_scope
user_obj
scope_name
transaction_complete
Nonunique
XIE3gst_context_scope
session_obj
scope_name
transaction_complete
Nonunique
XIE4gst_context_scope
parent_context_scope_obj
Nonunique


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095